package com.zhijiang.common.util;

import cn.hutool.core.date.LocalDateTimeUtil;

import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.regex.Pattern;

/**
 * @author 75936
 * @version 1.0
 * @project zhiJiangHealthBureau
 * @description
 * @date 2023-01-11 15:17:41
 */
public class NumberUtil {

    public static String toNumber(Date mBeginDate){
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMdd");
        String format = simpleDateFormat.format(mBeginDate);
        String REGEX = "[^0-9]";
        String ticket = Pattern.compile(REGEX).matcher(format).replaceAll("").trim();
        //System.out.println(ticket);
        return ticket;
    }
}
